import Cookies from 'js-cookie'

const TokenKey = 'oa-office-system-token'// 设置用户的 token
const timeOut = 'oa-office-timeout-key'// 存储 token 时间戳
// token 存储方法
export function getToken() {
  return Cookies.get(TokenKey)
}

export function setToken(token) {
  return Cookies.set(TokenKey, token)
}

export function removeToken() {
  return Cookies.remove(TokenKey)
}

// timeout 时间戳修改 方法
export function getTimeStamp() {
  return Cookies.get(timeOut)
}
export function setTimeStamp() {
  return Cookies.set(timeOut, Date.now())
}
